package exam.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import exam.bean.UserGroup;
import exam.dao.UserGroupDao;
import exam.service.UserGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class UserGroupServiceImpl implements UserGroupService {

    @Autowired
    UserGroupDao userGroupDao;

    @Override
    public int insertInfo(UserGroup userGroup) {
        return userGroupDao.insertInfo(userGroup);
    }

    @Override
    public int deleteInfo(int id) {
        return userGroupDao.deleteInfo(id);
    }

    @Override
    public int updateInfo(UserGroup userGroup) {
        return userGroupDao.updateInfo(userGroup);
    }

    @Override
    public UserGroup selectInfoSingle(Map<String, Object> map) {
        return userGroupDao.selectInfo(map).get(0);
    }

    @Override
    public List<UserGroup> selectInfo(Map<String,Object> queryMap) {
        return userGroupDao.selectInfo(queryMap);
    }
}
